package com.spring.nio.service.common;

import lombok.Data;

/**
 * 文件响应
 * @author spring
 */
@Data
public class Response {
    public static final String NO_RESULT = "NO_RESULT";
    /**
     * 响应码
     * */
    private String code;

    /**
     * 响应结果
     * */
    private String result;

    /**
     * 异常信息
     * */
    private String error;

    public enum StatusCode {
        SUCCESS("200", "请求成功"),
        FAIL("500", "请求失败");

        private String code;

        private String description;

        StatusCode(String code, String description) {
            this.code = code;
            this.description = description;
        }

        public String getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }
    }
}
